81. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2020-08-14 00:01:33 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

81.1 Files compared

#LocationFileLast Modified
1Porto v3.2.3/Magento 2.x/Porto Theme/app/code/Mageplaza/LayeredNavigation/Model/SearchSearchCriteriaBuilder.php2018-10-10 20:33:20 +0000
2Porto v3.2.4/Magento 2.x/Porto Theme/app/code/Mageplaza/LayeredNavigation/Model/SearchSearchCriteriaBuilder.php2020-06-26 11:11:14 +0000

81.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged6188
Changed335
Inserted22
Removed00

81.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

81.4 Active regular expressions

No regular expressions were active.

81.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Mageplaza 3  * Mageplaza
4  * 4  *
5  * NOTICE OF LICENSE 5  * NOTICE OF LICENSE
6  * 6  *
7  * This source file is subject to the Mageplaza.com license that is 7  * This source file is subject to the Mageplaza.com license that is
8  * available through the world-wide-web at this URL: 8  * available through the world-wide-web at this URL:
9  * https://www.mageplaza.com/LICENSE.txt 9  * https://www.mageplaza.com/LICENSE.txt
10  * 10  *
11  * DISCLAIMER 11  * DISCLAIMER
12  * 12  *
13  * Do not edit or add to this file if you wish to upgrade this extension to newer 13  * Do not edit or add to this file if you wish to upgrade this extension to newer
14  * version in the future. 14  * version in the future.
15  * 15  *
16  * @category    Mageplaza 16  * @category    Mageplaza
17  * @package     Mageplaza_LayeredNavigation 17  * @package     Mageplaza_LayeredNavigation
18  * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/) 18  * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
19  * @license     https://www.mageplaza.com/LICENSE.txt 19  * @license     https://www.mageplaza.com/LICENSE.txt
20  */ 20  */
21  21 
22 namespace Mageplaza\LayeredNavigation\Model\Search; 22 namespace Mageplaza\LayeredNavigation\Model\Search;
23  23 
24 use Magento\Framework\Api\ObjectFactory; 24 use Magento\Framework\Api\ObjectFactory;
25 use Magento\Framework\Api\Search\SearchCriteria; 25 use Magento\Framework\Api\Search\SearchCriteria;
26 use Magento\Framework\Api\Search\SearchCriteriaBuilder as SourceSearchCriteriaBuilder; 26 use Magento\Framework\Api\Search\SearchCriteriaBuilder as SourceSearchCriteriaBuilder;
27 use Magento\Framework\Api\SortOrderBuilder; 27 use Magento\Framework\Api\SortOrderBuilder;
28 use Mageplaza\LayeredNavigation\Helper\Data as LayerHelper; 28 use Mageplaza\LayeredNavigation\Helper\Data as LayerHelper;
29  29 
30 /** 30 /**
31  * Builder for SearchCriteria Service Data Object 31  * Builder for SearchCriteria Service Data Object
32  */ 32  */
33 class SearchCriteriaBuilder extends SourceSearchCriteriaBuilder 33 class SearchCriteriaBuilder extends SourceSearchCriteriaBuilder
34 { 34 {
35     /** 35     /**
36      * @var \Mageplaza\LayeredNavigation\Helper\Data as LayerHelper; 36      * @var LayerHelper as LayerHelper;
37      */ 37      */
38     protected $helper; 38     protected $helper;
39  39 
40     /** 40     /**
41      * SearchCriteriaBuilder constructor. 41      * SearchCriteriaBuilder constructor.
    42      *
42      * @param LayerHelper $helper 43      * @param LayerHelper $helper
43      * @param ObjectFactory $objectFactory 44      * @param ObjectFactory $objectFactory
44      * @param FilterGroupBuilder $filterGroupBuilder 45      * @param FilterGroupBuilder $filterGroupBuilder
45      * @param SortOrderBuilder $sortOrderBuilder 46      * @param SortOrderBuilder $sortOrderBuilder
46      */ 47      */
47     public function __construct( 48     public function __construct(
48         LayerHelper $helper, 49         LayerHelper $helper,
49         ObjectFactory $objectFactory, 50         ObjectFactory $objectFactory,
50         FilterGroupBuilder $filterGroupBuilder, 51         FilterGroupBuilder $filterGroupBuilder,
51         SortOrderBuilder $sortOrderBuilder 52         SortOrderBuilder $sortOrderBuilder
52     )
 53     ) {
53     {    
54         $this->helper = $helper; 54         $this->helper = $helper;
    55 
55         parent::__construct($objectFactory, $filterGroupBuilder, $sortOrderBuilder); 56         parent::__construct($objectFactory, $filterGroupBuilder, $sortOrderBuilder);
56     } 57     }
57  58 
58     /** 59     /**
59      * @param $attributeCode 60      * @param $attributeCode
60      * 61      *
61      * @return $this 62      * @return $this
62      */ 63      */
63     public function removeFilter($attributeCode) 64     public function removeFilter($attributeCode)
64     { 65     {
65         $this->filterGroupBuilder->removeFilter($attributeCode); 66         $this->filterGroupBuilder->removeFilter($attributeCode);
66  67 
67         return $this; 68         return $this;
68     } 69     }
69  70 
70     /** 71     /**
71      * @return SearchCriteriaBuilder 72      * @return SearchCriteriaBuilder
72      */ 73      */
73     public function cloneObject() 74     public function cloneObject()
74     { 75     {
75         $cloneObject = clone $this; 76         $cloneObject = clone $this;
76         $cloneObject->setFilterGroupBuilder($this->filterGroupBuilder->cloneObject()); 77         $cloneObject->setFilterGroupBuilder($this->filterGroupBuilder->cloneObject());
77  78 
78         return $cloneObject; 79         return $cloneObject;
79     } 80     }
80  81 
81     /** 82     /**
82      * @param $filterGroupBuilder 83      * @param $filterGroupBuilder
83      */ 84      */
84     public function setFilterGroupBuilder($filterGroupBuilder) 85     public function setFilterGroupBuilder($filterGroupBuilder)
85     { 86     {
86         $this->filterGroupBuilder = $filterGroupBuilder; 87         $this->filterGroupBuilder = $filterGroupBuilder;
87     } 88     }
88  89 
89     /** 90     /**
90      * Return the Data type class name 91      * Return the Data type class name
91      * 92      *
92      * @return string 93      * @return string
93      */ 94      */
94     protected function _getDataObjectType() 95     protected function _getDataObjectType()
95     { 96     {
96         return 'Magento\Framework\Api\Search\SearchCriteria'; 97         
return SearchCriteria::class;
97     }    
98     
99     /**    
100      * Builds the SearchCriteria Data Object    
101      *    
102      * @return SearchCriteria
    
103      */    
104     public function create()    
105     {    
106         if ($this->helper->versionCompare('2.2.0')) {    
107             $this->data[SearchCriteria::FILTER_GROUPS] = [$this->filterGroupBuilder->create()];    
108             $this->data[SearchCriteria::SORT_ORDERS]   = [$this->sortOrderBuilder->create()];    
109         }    
110     
111         return parent::create();    
112     }    
113     
114     /**    
115      * Create a filter group based on the filter array provided and add to the filter groups    
116      *    
117      * @param \Magento\Framework\Api\Filter $filter    
118      * @return $this    
119      */    
120     public function addFilter(\Magento\Framework\Api\Filter $filter)    
121     {    
122         $this->filterGroupBuilder->addFilter($filter);    
123     
124         return $this;    
125     } 98     }
126 } 99 }